/*
 * Created by 2006-7-6 下午10:19:42
 * $Id$
 */
package com.someok.base.common;

import org.apache.log4j.Logger;
import org.springframework.test.AbstractTransactionalDataSourceSpringContextTests;

/**
 * 
 * <p>
 * <a href="BaseManagerTestCase.java.html"><i>View Source</i></a>
 * </p>
 * 
 * @author wjx
 * @version $Revision$ $Date$
 */
public abstract class BaseManagerTestCase extends
		AbstractTransactionalDataSourceSpringContextTests {
	protected Logger logger = Logger.getLogger(getClass());
	
	/**
	 * 设置事务结束之后是否提交.
	 * 子类如果覆盖本方法，需要记得调用<code>super.onSetUpInTransaction()</code>.
	 */
	protected void onSetUpInTransaction() throws Exception {
		// 下面代码如果屏蔽，则表示回滚
		setComplete();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.springframework.test.AbstractDependencyInjectionSpringContextTests#getConfigLocations()
	 */
	protected String[] getConfigLocations() {
		setAutowireMode(AUTOWIRE_BY_NAME);
		return new String[] { "classpath:applicationContext-test.xml",
				"classpath:applicationContext-hibernate.xml",
				"classpath:applicationContext-manager.xml"};
	}

}
